﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Acceron.University.DBAccess;

namespace GA_Scheduler
{
    public class Gen
    {
        private Class cl;
        private Room room;

        public int Class_id { get; set; }
        public int Room_id { get; set; }
        public Class Class 
        {
            get 
            {
                return cl; 
            } 
            set
            {
                cl = value;
                if(value != null)
                {
                    Class_id = value.Class_ID;
                }
                else
                {
                    Class_id = default(int);
                }
            } 
        }
        public int Pair { get; set; }
        public int DayOfWeek { get; set; }
        public Room Room 
        { 
            get
            {
                return room;
            }
            set
            {
                room = value;
                if(value != null)
                {
                    Room_id = value.Room_ID;
                }
                else
                {
                    Room_id = default(int);
                }
            }
        }
    }
}
